package com.ebt.m.policy.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import com.ebt.m.R;
import com.ebt.m.commons.buscomponent.listview.IView;
import com.ebt.m.data.rxModel.apibean.FilterDataBean;


/**
 * @author Damon.Han
 */
public class FilterTitleView extends IView {

    TextView nameView;

    public FilterTitleView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        View view = inflate(context, R.layout.view_online_policy_filter_title, this);
        nameView = (TextView) view.findViewById(R.id.name);
    }

    public FilterTitleView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public FilterTitleView(Context context) {
        this(context, null);
    }

    @Override
    public void update(Object... args) {
        FilterDataBean title = (FilterDataBean) args[0];
        nameView.setText(title.getLabel());
    }

}
